function M = plotMatrix3d(M,varargin)
% simple 3d plot of a Matrix
clf;
imagesc(M);
axis equal
axis([0.5 size(M,1)+.5 0.5 size(M,2)+.5]);
set(gca,'visible','off');

if nargin > 1
    cell_types = varargin{1};
    M = colorbar;
    set(M,'ytick',cell_types.value);
    set(M,'yticklabel',cell_types.name)
end

